﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="TeamRating.aspx.vb" Inherits="soccer.TeamRating" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style>
        .emptypng {
            background-image: url("empty.png");
            width: 32px;
            height: 32px;
        }
        .smileypng {
            background-image: url("smiley.png");
            width: 32px;
            height: 32px;
        }
        .donesmileypng {
            background-image: url("smiley-done.png");
            width: 32px;
            height: 32px;
        }
        .auto-style1 {
            font-size: medium;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <p class="auto-style1">
        &nbsp;</p>
    <p class="auto-style1">
        <asp:Button ID="bn_Like" runat="server" Text="Like" />
    </p>
    <br /> <br />
    <asp:Label ID="lbl_like" runat="server" Text="You like this fixture !"></asp:Label>
    <br /> <br />
    <p class="auto-style1">
        <strong>Please rate this fixture if you watched it - scale of 1 (uninteresting) to 5 (full value&#39;s worth)</strong></p>
    <p>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="RateDataSource">
            <Columns>
                <asp:BoundField DataField="fixtureID" HeaderText="fixtureID" InsertVisible="False" SortExpression="fixtureID" />
                <asp:BoundField DataField="homeTeam" HeaderText="homeTeam" SortExpression="homeTeam" />
                <asp:BoundField DataField="homeTeamScore" HeaderText="homeTeamScore" SortExpression="homeTeamScore" />
                <asp:BoundField DataField="awayTeam" HeaderText="awayTeam" SortExpression="awayTeam" />
                <asp:BoundField DataField="awayTeamScore" HeaderText="awayTeamScore" SortExpression="awayTeamScore" />
                <asp:BoundField DataField="fixtureDate" HeaderText="fixtureDate" SortExpression="fixtureDate" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="RateDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:SoccerConnectionString %>" ProviderName="<%$ ConnectionStrings:SoccerConnectionString.ProviderName %>" SelectCommand="SELECT Fixture.fixtureID, Team_1.teamName AS homeTeam, Fixture.homeTeamScore, Team.teamName AS awayTeam, Fixture.awayTeamScore, Fixture.fixtureDate FROM ((Fixture INNER JOIN Team ON Fixture.awayTeamId = Team.teamID) INNER JOIN Team Team_1 ON Fixture.hometeamId = Team_1.teamID) WHERE (fixtureId = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="?" QueryStringField="fixtureId" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="TeamDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:SoccerConnectionString %>" ProviderName="<%$ ConnectionStrings:SoccerConnectionString.ProviderName %>" SelectCommand="SELECT [teamID], [teamName] FROM [Team] WHERE ([teamID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="teamID" QueryStringField="teamId" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>

    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <asp:Rating ID="Rating1" runat="server" EmptyStarCssClass="emptypng" FilledStarCssClass="smileypng" StarCssClass="smileypng" WaitingStarCssClass="donesmileypng">
    </asp:Rating>
    <p>
    <br /><br />
        <asp:Button ID="bn_SaveRating" runat="server" Text="Save Rating" />
    <p>
    </p>
</asp:Content>
